
export default class Singer {
    constructor({id, name}) {
      this.id = id
      this.name = name
      this.avatar = `https://y.gtimg.cn/music/photo_new/T001R300x300M000${id}.jpg?max_age=2592000`
    }
}


  // 获取歌曲的vkey
// export function getPlaySongKey(mid) {
//   const url = 'https://u.y.qq.com/cgi-bin/musicu.fcg'
//   const data = Object.assign({}, commonParams, {
//     loginUin: 0,
//     hostUin: 0,
//     platform: 'yqq.json',
//     needNewCode: 0,
//     data: `{"req_0":{"module":"vkey.GetVkeyServer","method":"CgiGetVkey","param":{"guid":"1933776370","songmid":["${mid}"],"songtype":[0],"uin":"0","loginflag":1,"platform":"20"}},"comm":{"uin":0,"format":"json","ct":24,"cv":0}}`
//   })
//   return jsonp(url, data, '')
// }


// export function getSongUrl(mid) {
//   return getPlaySongKey(mid).then(res => {
//     if (res.code === 0) {
//       const purl = res.req_0.data.midurlinfo[0].purl
//       const host = res.req_0.data.sip[0]
//       return Promise.resolve({
//         code: 0,
//         url: host + purl
//       })
//     }
//   })
// }
